package cn.funeralobjects.ams.web.controller;

import cn.funeralobjects.ams.entity.EAccessKey;
import cn.funeralobjects.ams.model.AccessKey;
import cn.funeralobjects.ams.service.AccessKeyService;
import cn.funeralobjects.ams.web.api.AccessKeyApi;
import cn.funeralobjects.ams.web.mapper.AccessKeyMapper;
import cn.funeralobjects.ams.web.model.MAccessKey;
import cn.funeralobjects.ams.web.model.VAccessKey;
import cn.funeralobjects.common.service.CommonModifyService;
import cn.funeralobjects.common.web.controller.CommonModifyController;
import cn.funeralobjects.common.web.controller.converter.ModelMapper;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author FuneralObjects
 * Create date: 2020/5/26 9:46 AM
 */
@RestController
@RequestMapping("/access-key")
public class AccessKeyController implements AccessKeyApi, CommonModifyController<VAccessKey, MAccessKey, AccessKey, EAccessKey, Integer> {

    @Resource
    private AccessKeyMapper accessKeyMapper;

    @Resource
    private AccessKeyService accessKeyService;

    @Override
    public ModelMapper<MAccessKey, AccessKey, EAccessKey, VAccessKey> modelMapper() {
        return accessKeyMapper;
    }

    @Override
    public CommonModifyService<AccessKey, EAccessKey, Integer> commonModifyService() {
        return accessKeyService;
    }
}
